
package jweslley.ProblemSetVolumes.VolumeIV;

import java.io.IOException;

import jweslley.Problem;
import jweslley.Problem.Status;

/**
 * http://icpcres.ecs.baylor.edu/onlinejudge/external/4/492.html
 *
 * @author  Jonhnny Weslley
 * @version 1.00, 18/10/2008
 */
@Problem(Status.Accepted)
public class PigLatin {

	static boolean isVowel(char c) {
		return c == 'a' || c == 'A' || 
				c == 'e' || c == 'E' ||
				c == 'i' || c == 'I' || 
				c == 'o' || c == 'O' || 
				c == 'u' || c == 'U';
	}

	static String toPigLatin(StringBuilder word) {
		if (word.length() == 0) {
			return "";
		}
		if (isVowel(word.charAt(0))) {
			return word + "ay";
		}
		word
		.append(word.charAt(0))
		.append("ay")
		.deleteCharAt(0);
		return word.toString();
	}

	public static void main(String[] args) throws IOException {
		StringBuilder out = new StringBuilder();
		StringBuilder word = new StringBuilder();
		int read; char c;
		while ((read = System.in.read()) != -1) {
			c = (char) read;
			if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
				word.append(c);
			} else {
				out
				.append(toPigLatin(word))
				.append(c);
				word.setLength(0);
			}
		}
		System.out.print(out);
	}

}
